package cn.kgc.jdktest.demo5;

import cn.kgc.jdktest.demo5.Cook;

/**
 * @Author:yaozhaobao
 * @Description:TODO
 * @version:1.0
 */
public class Test {

    public static void main(String[] args) {
        invokeDinnerCook(new Cook() {
            @Override
            public String makefood() {
                return "鷄肉";
            }
        });

        invokeDinnerCook(()->{
           return "鴨肉";
        });

        invokeDinnerCook(()-> "鵝肉");
    }


    public  static void invokeDinnerCook(Cook cook){
        System.out.println(cook.makefood());
    }
}
